package com.cnooc.zyfx;


import com.github.thorqin.toolkit.annotation.Service;
import com.github.thorqin.toolkit.db.DBService;
import com.github.thorqin.toolkit.validation.ValidateException;
import com.github.thorqin.toolkit.web.WebApplication;
import com.github.thorqin.toolkit.web.annotation.DBRouter;
import com.github.thorqin.toolkit.web.annotation.WebApp;
import com.github.thorqin.toolkit.web.annotation.WebRouter;
import com.github.thorqin.toolkit.web.router.WebDBRouter;
@WebApp(name = "MRP",
        routers = {
                @WebRouter("/api/*"),
                @WebRouter(value = "/action/*", type = MyApplication.MyDBRouter.class)
        },
        services = {
                @Service(value = "db", type = DBService.class),
                @Service(value = "sqlServer", type = DBService.class)
        }
)
public class MyApplication extends WebApplication {
    /* Uncomment following lines to enable database router*/
    @DBRouter
    public static class MyDBRouter extends WebDBRouter {
        public MyDBRouter(WebApplication application) throws ValidateException {
            super(application);
        }
    }

}


